# Dockerfile for jluzh-electric
# Suggest to use command "docker build jluzh-electric/ -t jluzh-electric:1.0" to build
# Author: WeiYuanStudio

FROM golang:latest

# Set up PROXY ENV for local build go get, because GFW, please set up an available proxy for go get
# ENV LOCAL_NETWORK_PROXY_PATH=http://192.168.1.129:7890
# ENV HTTP_PROXY=$LOCAL_NETWORK_PROXY_PATH
#ENV HTTPS_PROXY=$LOCAL_NETWORK_PROXY_PATH

# COPY go code to container
WORKDIR $GOPATH/src/jluzh-electric
COPY . $GOPATH/src/jluzh-electric

# Run go build
RUN go build ./cmd/main.go

# Run go application container
EXPOSE 8080
CMD ["./main"]
